Skip to content

ASoC: max98363: set first_hw_init = true before pm_runtime_get_noresume - #4462

Closed
bardliao wants to merge 1 commit into
thesofproject:topic/sof-devfrom
bardliao:first_hw_init
Closed

bardliao wants to merge 1 commit into
thesofproject:topic/sof-devfrom
bardliao:first_hw_init

Conversation

@bardliao

@bardliao bardliao commented Jul 6, 2023

Copy link
Copy Markdown
Collaborator

max98363_resume() will return 0 directly if max98363->first_hw_init is false. This test is to make sure max98363_resume won't do anything before the codec is attached. However, max98363_io_init called pm_runtime_get_noresume before setting max98363->first_hw_init = true, as a result, max98363_resume() will return directly and doesn't do regcache_sync(). regcache_sync() is required in a corner case when pcm starts before the codec is attached.

max98363_resume() will return 0 directly if max98363->first_hw_init is
false. This test is to make sure max98363_resume won't do anything
before the codec is attached. However, max98363_io_init called
pm_runtime_get_noresume before setting max98363->first_hw_init = true,
as a result, max98363_resume() will return directly and doesn't do
regcache_sync(). regcache_sync() is required in a corner case when pcm
starts before the codec is attached.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant